package com.hongyun.tms.common.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hongyun.tms.common.annotation.Dict;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import com.hongyun.tms.infra.excel.converter.LocalDateTimeOrDateConverter;
import com.hongyun.tms.infra.excel.converter.dict.DictConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 船舶作业 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@ExcelInfo(fileName = "作业项导出")
public class MWorkItemVO implements Serializable {

    @ApiModelProperty(value = "主键")
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "作业项目")
    @ExcelProperty(value = "作业项目", index = 0)
    private String workItem;

    @ApiModelProperty(value = "作业类型代码，字典")
    @Dict(code = "WORK_TYPE", fieldName = "workTypeName")
    @ExcelProperty(value = "作业类型", index = 1, converter = DictConverter.class)
    private String workTypeCode;


    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "创建时间", converter = LocalDateTimeOrDateConverter.class, index = 2)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelIgnore
    private LocalDateTime updateTime;
}

